#ifndef UNIVERSALSERIALPORT_HPP
#define UNIVERSALSEROALPORT_HPP

class UniversalSerialPort{
public:
    UniversalSerialPort(unsigned char serial_port_number);
    virtual bool init(void) = 0;
    virtual int send(void * data, int length) = 0;
    virtual int receive(void * data) = 0;

    static UniversalSerialPort * getInstance(unsigned char serial_port_number);
    
protected:
    unsigned char port_number;
};

class _UniversalSerialPort : public UniversalSerialPort{
public:
    _UniversalSerialPort(unsigned char serial_port_number);
    virtual bool init();
    virtual int send(void *data,int length);
    virtual int receive(void *data);

};


#endif
